<template>
  <div>
    <h2>子组件</h2>
    <div>{{msg }}</div>
    <button @click="send">发送</button>
  </div>
</template>


<script lang='ts' setup>
import {defineProps,defineEmits} from 'vue'
interface PropsType{
  msg:string
}
interface EmitType{
  (e:'make',msg:string):void
}
defineProps<PropsType>()
const emit=defineEmits<EmitType>()

const send=()=>{
  emit('make','子给父的信息')
}
</script>

<style lang='scss' scoped>
</style>